define([
  'fe-header'
], (...vue) => {

  const [
    FeHeader
  ] = vue;

  const Login = {
    template: `<main>

    <fe-header :btnData='btnData'>
    </fe-header>

    <router-view></router-view>

    <article class="am-container am-padding-sm am-margin-vertical dg-art" :class="{ 'am-hide': isRegister }">
      <div class="am-g">
        <div class="am-u-sm-6 am-u-md-3">
          <!-- <router-link to='/login/register' class="am-btn am-btn-default">我还未注册帐号</router-link> -->
          <button class="am-btn am-btn-default" @click="register">我还未注册帐号</button>
        </div>

        <div class="am-u-sm-6 am-u-md-3 am-u-md-push-6">
          <button type="button" class="am-btn am-btn-default">我选择联合登录</button>
        </div>

        <div class="am-u-sm-12 am-u-md-6 am-u-md-pull-3">
          <form class="am-form am-form-horizontal">
            <fieldset class="am-form-set">
              <legend class="am-text-xxl">设计师登录</legend>

              <input type="text" placeholder="大赛帐号">
              <input type="text" placeholder="密码">
            </fieldset>
            <router-link to='/personal' class="am-btn am-btn-primary am-btn-block">登录</router-link>
          </form>
        </div>
      </div>
    </article>

    </main>`.replace(/[\r\n]/g, ''),
    data() {
      return {
        isRegister: false,
        btnData: [
          {
            name: '返回首页',
            href: '/'
          }
        ]
      }
    },
    components: {
      FeHeader, 
    },
    mounted() {
      
    },
    methods: {
      register() {
        this.isRegister = true;
        this.$router.push('/login/register');
      }
    }
  }

  return Login;
});